﻿<%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="MonthCapitalStatistics.aspx.cs" Inherits="Thksoft.Module.StatisticalReport.MonthCapitalStatistics" %>

<!DOCTYPE html>
<html class="L_UI">
<head id="Head1" runat="server">
    <title>月资金统计</title>
    <link href="/UserCotrols/My97DatePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/Scripts/jquery-1.7.min.js"></script>
    <script type="text/javascript" src="/UserCotrols/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript">
        //查询单击事件
        function FORM_QUERY() {
            var companyid = $('#FORM_COMPANY_ID').val();
            var begindate = $('#FORM_BEGIN_DATE').val();
            var overdate = $('#FORM_OVER_DATE').val();
            if (begindate != '' && overdate != '') {
                if (parseInt(begindate) > parseInt(overdate)) {
                    top.MessageBox.Alert("结束时间必须大于或者等于开始时间");
                    return;
                }
            }
            $('#btnSelect').click();
        }
        function FROM_SHOW1(year, month, id, type) {
            var option = {};
            option.Area = ['1000px', '570px'];
            option.Title = year + '年' + month + '月资金明细报表';

            if (type == 1) {
                option.Url = '/Module/StatisticalReport/MonthDataReport.aspx?ID=' + id;
            }
            else {
                //  alert("aa");
                option.Scrollbar = false;
                option.shadeClose = true;
                option.maxmin = true;
                option.Url = '/Module/StatisticalReport/MonthDataGpReport.html?ID=' + id;
            }
            top.MessageBox.Load(option);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="Window" style="min-width: 900px;">
            <div class="Header" style="height: 69px;">
                <table border="0" cellpadding="0" cellspacing="0" width="100%" class="table">
                    <tr>
                        <td style="width: 7%; text-align: right; padding-right: 5px;">公&nbsp;&nbsp;&nbsp;&nbsp;司：
                        </td>
                        <td style="width: 15%; text-align: left; padding-left: 10px;">
                            <uc2:CtrlCompany runat="server" ID="FORM_COMPANY" ClientIDMode="Static" />
                        </td>
                        <td style="width: 7%; text-align: right; padding-right: 5px;">时间段：
                        </td>
                        <td style="text-align: left; padding-left: 10px;">
                            <input id="FORM_BEGIN_DATE" runat="server" class="Wdate" style="width: 80px;" type="text"
                                onclick="WdatePicker({ dateFmt: 'yyyy-MM' })" />
                            -
                                    <input id="FORM_OVER_DATE" runat="server" class="Wdate" style="width: 80px;" type="text"
                                        onclick="WdatePicker({ dateFmt: 'yyyy-MM' })" />
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="4">
                            <input type="button" onclick="FORM_QUERY()" value="查询" class="bt_css_s" />
                            <asp:Button ID="btnSelect" runat="server" Text="查询" CssClass="hide" OnClick="QUERY_CLICK" />&nbsp;
                                    <asp:Button ID="btnPrint" runat="server" Text="导出" CssClass="bt_css_s"
                                        OnClick="btnPrint_Click" />&nbsp;
                                    <asp:Button ID="Button1" runat="server" Text="打印" CssClass="bt_css_s"
                                        OnClick="Button1_Click" />&nbsp;
                        </td>
                    </tr>
                </table>
            </div>
            <div class="Content" style="top: 70px;">
                <div class="Pg-Content">
                    <asp:ScriptManager ID="ScriptManagers" runat="server" EnablePageMethods="True" EnableScriptGlobalization="True"
                        EnableScriptLocalization="True">
                    </asp:ScriptManager>
                    <asp:Panel ID="Panel1" runat="server">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <asp:GridView ID="TABLE" runat="server" AutoGenerateColumns="False" CssClass="cont_list zebra"
                                    Width="100%" EmptyDataText="没有查找到您要的数据" AllowSorting="True" OnSorting="SORTING_EVENT">
                                    <Columns>
                                        <asp:BoundField DataField="CMY_NAME" HeaderText="公司名称" SortExpression="CMY_NAME" ItemStyle-Width="150px" />
                                        <asp:BoundField DataField="NAME" HeaderText="业务名称" SortExpression="NAME" />

                                        <asp:BoundField DataField="USER_DATE" HeaderText="时间" SortExpression="USER_DATE" ItemStyle-Width="80px" />
                                        <%--T1.D_OPERATOR_TIME--%>
                                        <asp:BoundField DataField="OPERAR_NAME" HeaderText="提交人" SortExpression="OPERAR_NAME" ItemStyle-Width="80px" />
                                        <%--T1.N_USER_ID--%>
                                        <asp:TemplateField HeaderText="报表" ItemStyle-Width="10%">
                                            <ItemTemplate>
                                                <a href="#" onclick="FROM_SHOW1(<%#Eval("YEAR")%>,<%#Eval("MONTH")%>,<%#Eval("ID")%>,1)" style="color: Blue">报表</a>
                                                <a href="#" onclick="FROM_SHOW1(<%#Eval("YEAR")%>,<%#Eval("MONTH")%>,<%#Eval("ID")%>,2)" style="color: Blue">图形报表</a>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </asp:Panel>
                </div>
                <div class="Pg">
                    <uc1:Pagination ID="PageIng" runat="server" IsDataBindOnLoad="false" OnDataBinding="PageIng_DataBinding"
                        Visible="false" />
                </div>
            </div>
        </div>
    </form>
</body>
</html>